home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / include / gdict-1.0 / gdict / gdict-strategy-chooser.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-04-09  |  4.2 KB  |  95 lines

  1. /* gdict-strategy-chooser.h - display widget for strategy names
  2.  *
  3.  * Copyright (C) 2006  Emmanuele Bassi <ebassi@gmail.com>
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Library General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Library General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Library General Public
  16.  * License along with this library; if not, write to the
  17.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18.  */
  19.  
  20. #ifndef __GDICT_STRATEGY_CHOOSER_H__
  21. #define __GDICT_STRATEGY_CHOOSER_H__
  22.  
  23. #include <gtk/gtkvbox.h>
  24. #include "gdict-context.h"
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. #define GDICT_TYPE_STRATEGY_CHOOSER        (gdict_strategy_chooser_get_type ())
  29. #define GDICT_STRATEGY_CHOOSER(obj) \
  30. (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDICT_TYPE_STRATEGY_CHOOSER, GdictStrategyChooser))
  31. #define GDICT_IS_STRATEGY_CHOOSER(obj) \
  32. (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDICT_TYPE_STRATEGY_CHOOSER))
  33. #define GDICT_STRATEGY_CHOOSER_CLASS(klass) \
  34. (G_TYPE_CHECK_CLASS_CAST ((klass), GDICT_TYPE_STRATEGY_CHOOSER, GdictStrategyChooserClass))
  35. #define GDICT_IS_STRATEGY_CHOOSER_CLASS(klass) \
  36. (G_TYPE_CHECK_CLASS_TYPE ((klass), GDICT_TYPE_STRATEGY_CHOOSER))
  37. #define GDICT_STRATEGY_CHOOSER_GET_CLASS(obj) \
  38. (G_TYPE_INSTANCE_GET_CLASS ((obj), GDICT_TYPE_STRATEGY_CHOOSER, GdictStrategyChooserClass))
  39.  
  40. typedef struct _GdictStrategyChooser        GdictStrategyChooser;
  41. typedef struct _GdictStrategyChooserPrivate    GdictStrategyChooserPrivate;
  42. typedef struct _GdictStrategyChooserClass    GdictStrategyChooserClass;
  43.  
  44. struct _GdictStrategyChooser
  45. {
  46.   GtkVBox parent_instance;
  47.   
  48.   GdictStrategyChooserPrivate *priv;
  49. };
  50.  
  51. struct _GdictStrategyChooserClass
  52. {
  53.   GtkVBoxClass parent_class;
  54.  
  55.   void (*strategy_activated) (GdictStrategyChooser *chooser,
  56.                     const gchar          *name,
  57.                   const gchar          *description);
  58.   
  59.   void (*_gdict_padding1) (void);
  60.   void (*_gdict_padding2) (void);
  61.   void (*_gdict_padding3) (void);
  62.   void (*_gdict_padding4) (void);
  63.   void (*_gdict_padding5) (void);
  64.   void (*_gdict_padding6) (void);
  65. };
  66.  
  67. GType         gdict_strategy_chooser_get_type             (void) G_GNUC_CONST;
  68.  
  69. GtkWidget *   gdict_strategy_chooser_new                  (void);
  70. GtkWidget *   gdict_strategy_chooser_new_with_context     (GdictContext         *context);
  71.  
  72. GdictContext *gdict_strategy_chooser_get_context          (GdictStrategyChooser *chooser);
  73. void          gdict_strategy_chooser_set_context          (GdictStrategyChooser *chooser,
  74.                                    GdictContext         *context);
  75. gboolean      gdict_strategy_chooser_select_strategy      (GdictStrategyChooser *chooser,
  76.                                                            const gchar          *strat_name);
  77. gboolean      gdict_strategy_chooser_unselect_strategy    (GdictStrategyChooser *chooser,
  78.                                                            const gchar          *strat_name);
  79. gboolean      gdict_strategy_chooser_set_current_strategy (GdictStrategyChooser *chooser,
  80.                                                            const gchar          *strat_name);
  81. gchar *       gdict_strategy_chooser_get_current_strategy (GdictStrategyChooser *chooser) G_GNUC_MALLOC;
  82. gchar **      gdict_strategy_chooser_get_strategies       (GdictStrategyChooser *chooser,
  83.                                    gsize                 length) G_GNUC_MALLOC;
  84. gint          gdict_strategy_chooser_count_strategies     (GdictStrategyChooser *chooser);
  85. gboolean      gdict_strategy_chooser_has_strategy         (GdictStrategyChooser *chooser,
  86.                                    const gchar          *strategy);
  87. void          gdict_strategy_chooser_refresh              (GdictStrategyChooser *chooser);
  88. void          gdict_strategy_chooser_clear                (GdictStrategyChooser *chooser);
  89. GtkWidget *   gdict_strategy_chooser_add_button           (GdictStrategyChooser *chooser,
  90.                                                            const gchar          *button_text);
  91.  
  92. G_END_DECLS
  93.  
  94. #endif /* __GDICT_STRATEGY_CHOOSER_H__ */
  95.